package com.chuangjiangx.member.basic.ddd.domain.model;

/**
 * 储值赠送类型
 */
public enum MbrStoredRulesGiftType {
    PAYGIFTSCORE("储值赠送积分", (byte) 1),
    PAYGIFTAMOUNT("储值赠送金额", (byte) 2);
    public final String name;
    public final byte value;

    MbrStoredRulesGiftType(String name, byte value) {
        this.name = name;
        this.value = value;
    }

    public static MbrStoredRulesGiftType getStoredRulesType(byte value) {
        for (MbrStoredRulesGiftType type : MbrStoredRulesGiftType.values()) {
            if (type.value == value) {
                return type;
            }
        }
        return null;
    }

}
